﻿using Leo.Common.MQ;

namespace Leo.Common.RabbitMQ
{
    //[NullableContext(1)]
    //[Nullable(0)]
    public class RabbitProvider : RabbitMessageQueueProviderBase, IMessageQueueProvider
    {
        private readonly RabbitBuilder rabbit;

        public RabbitProvider(RabbitBuilder builder)
        {
            this.rabbit = builder;
        }

        //[Nullable(2)]
        public override IMQProducer Producer
        {
            //[NullableContext(2)]
            get
            {
                return this.rabbit.Producer;
            }
        }

        public override List<MQConsumerBase> Consumers
        {
            get
            {
                return this.rabbit.Consumers;
            }
        }

    }
}
